process {

    withName: SAMTOOLS_SORT {
        ext.prefix  = { "${meta.id}.sorted" }
        ext.args    = "--write-index"
    }

}
